// 字符串截取 00000000287400000

const x = (str: string): string => {
  let left = 0, right = 0
  let t = 0
  for (let v of str) {
    if (v !== '0' && t === 0) {
      left = right
      t = 1
    }
    if (v === '0' && t === 1) {
      break;
    }
    right++
  }
  return str.slice(left, right)
}
console.log(x('00000000287400000'))